<template>
  <view class="layout-default">
    <slot></slot>
    <d-loading />
    <request-loading />
  </view>
</template>

<script lang="ts" setup>
import {navigateToInterceptor} from "@/interceptors/route";
import {currRoute} from "@/utils";
import {useAppStore} from "@/stores";

onLoad(() => {
  useAppStore().setShowGLoading(true)
  navigateToInterceptor.invoke({url: currRoute().path})
})

onShow(() => {
  useAppStore().setShowGLoading(false)
})
</script>

<style lang="scss" scoped>
.layout-default {
  position: relative;
}
</style>
